package cn.ibizlab.odoo.core.odoo_fleet.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.odoo.util.domain.EntityBase;
import cn.ibizlab.odoo.util.annotation.DEField;
import cn.ibizlab.odoo.util.enums.DEPredefinedFieldType;
import cn.ibizlab.odoo.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.Data;
import org.springframework.data.annotation.Transient;

import cn.ibizlab.odoo.util.domain.EntityClient;

/**
 * ServiceApi [车辆燃油记录] 对象
 */
@Data
public class Fleet_vehicle_log_fuel extends EntityClient implements Serializable {

    /**
     * ID
     */
    @DEField(isKeyField=true)
    @JSONField(name = "id")
    @JsonProperty("id")
    private Integer id;

    /**
     * 每公升价格
     */
    @DEField(name = "price_per_liter")
    @JSONField(name = "price_per_liter")
    @JsonProperty("price_per_liter")
    private Double pricePerLiter;

    /**
     * 包括服务
     */
    @JSONField(name = "cost_ids")
    @JsonProperty("cost_ids")
    private String costIds;

    /**
     * 显示名称
     */
    @JSONField(name = "display_name")
    @JsonProperty("display_name")
    private String displayName;

    /**
     * 最后更新时间
     */
    @DEField(name = "write_date" , preType = DEPredefinedFieldType.UPDATEDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "write_date" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("write_date")
    private Timestamp writeDate;

    /**
     * 升
     */
    @JSONField(name = "liter")
    @JsonProperty("liter")
    private Double liter;

    /**
     * 最后修改日
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "__last_update" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("__last_update")
    private Timestamp LastUpdate;

    /**
     * 便签
     */
    @JSONField(name = "notes")
    @JsonProperty("notes")
    private String notes;

    /**
     * 创建时间
     */
    @DEField(name = "create_date" , preType = DEPredefinedFieldType.CREATEDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "create_date" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("create_date")
    private Timestamp createDate;

    /**
     * 发票参考
     */
    @DEField(name = "inv_ref")
    @JSONField(name = "inv_ref")
    @JsonProperty("inv_ref")
    private String invRef;

    /**
     * 类型
     */
    @JSONField(name = "cost_subtype_id")
    @JsonProperty("cost_subtype_id")
    private Integer costSubtypeId;

    /**
     * 创建人
     */
    @JSONField(name = "create_uid_text")
    @JsonProperty("create_uid_text")
    private String createUidText;

    /**
     * 里程表
     */
    @JSONField(name = "odometer_id")
    @JsonProperty("odometer_id")
    private Integer odometerId;

    /**
     * 费用所属类别
     */
    @JSONField(name = "cost_type")
    @JsonProperty("cost_type")
    private String costType;

    /**
     * 总价
     */
    @JSONField(name = "amount")
    @JsonProperty("amount")
    private Double amount;

    /**
     * 采购
     */
    @JSONField(name = "purchaser_id_text")
    @JsonProperty("purchaser_id_text")
    private String purchaserIdText;

    /**
     * 最后更新人
     */
    @JSONField(name = "write_uid_text")
    @JsonProperty("write_uid_text")
    private String writeUidText;

    /**
     * 总额
     */
    @JSONField(name = "cost_amount")
    @JsonProperty("cost_amount")
    private Double costAmount;

    /**
     * 上级
     */
    @JSONField(name = "parent_id")
    @JsonProperty("parent_id")
    private Integer parentId;

    /**
     * 车辆
     */
    @JSONField(name = "vehicle_id")
    @JsonProperty("vehicle_id")
    private Integer vehicleId;

    /**
     * 自动生成
     */
    @JSONField(name = "auto_generated")
    @JsonProperty("auto_generated")
    private String autoGenerated;

    /**
     * 合同
     */
    @JSONField(name = "contract_id")
    @JsonProperty("contract_id")
    private Integer contractId;

    /**
     * 成本说明
     */
    @JSONField(name = "description")
    @JsonProperty("description")
    private String description;

    /**
     * 名称
     */
    @JSONField(name = "name")
    @JsonProperty("name")
    private String name;

    /**
     * 供应商
     */
    @JSONField(name = "vendor_id_text")
    @JsonProperty("vendor_id_text")
    private String vendorIdText;

    /**
     * 里程表数值
     */
    @JSONField(name = "odometer")
    @JsonProperty("odometer")
    private Double odometer;

    /**
     * 日期
     */
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "date" , format="yyyy-MM-dd")
    @JsonProperty("date")
    private Timestamp date;

    /**
     * 单位
     */
    @JSONField(name = "odometer_unit")
    @JsonProperty("odometer_unit")
    private String odometerUnit;

    /**
     * 最后更新人
     */
    @DEField(name = "write_uid" , preType = DEPredefinedFieldType.UPDATEMAN)
    @JSONField(name = "write_uid")
    @JsonProperty("write_uid")
    private Integer writeUid;

    /**
     * 成本
     */
    @DEField(name = "cost_id")
    @JSONField(name = "cost_id")
    @JsonProperty("cost_id")
    private Integer costId;

    /**
     * 创建人
     */
    @DEField(name = "create_uid" , preType = DEPredefinedFieldType.CREATEMAN)
    @JSONField(name = "create_uid")
    @JsonProperty("create_uid")
    private Integer createUid;

    /**
     * 供应商
     */
    @DEField(name = "vendor_id")
    @JSONField(name = "vendor_id")
    @JsonProperty("vendor_id")
    private Integer vendorId;

    /**
     * 采购
     */
    @DEField(name = "purchaser_id")
    @JSONField(name = "purchaser_id")
    @JsonProperty("purchaser_id")
    private Integer purchaserId;


    /**
     * 
     */
    @JSONField(name = "odoocost")
    @JsonProperty("odoocost")
    private cn.ibizlab.odoo.core.odoo_fleet.domain.Fleet_vehicle_cost odooCost;

    /**
     * 
     */
    @JSONField(name = "odoopurchaser")
    @JsonProperty("odoopurchaser")
    private cn.ibizlab.odoo.core.odoo_base.domain.Res_partner odooPurchaser;

    /**
     * 
     */
    @JSONField(name = "odoovendor")
    @JsonProperty("odoovendor")
    private cn.ibizlab.odoo.core.odoo_base.domain.Res_partner odooVendor;

    /**
     * 
     */
    @JSONField(name = "odoocreate")
    @JsonProperty("odoocreate")
    private cn.ibizlab.odoo.core.odoo_base.domain.Res_users odooCreate;

    /**
     * 
     */
    @JSONField(name = "odoowrite")
    @JsonProperty("odoowrite")
    private cn.ibizlab.odoo.core.odoo_base.domain.Res_users odooWrite;




    /**
     * 设置 [每公升价格]
     */
    public void setPricePerLiter(Double pricePerLiter){
        this.pricePerLiter = pricePerLiter ;
        this.modify("price_per_liter",pricePerLiter);
    }
    /**
     * 设置 [升]
     */
    public void setLiter(Double liter){
        this.liter = liter ;
        this.modify("liter",liter);
    }
    /**
     * 设置 [便签]
     */
    public void setNotes(String notes){
        this.notes = notes ;
        this.modify("notes",notes);
    }
    /**
     * 设置 [发票参考]
     */
    public void setInvRef(String invRef){
        this.invRef = invRef ;
        this.modify("inv_ref",invRef);
    }
    /**
     * 设置 [成本]
     */
    public void setCostId(Integer costId){
        this.costId = costId ;
        this.modify("cost_id",costId);
    }
    /**
     * 设置 [供应商]
     */
    public void setVendorId(Integer vendorId){
        this.vendorId = vendorId ;
        this.modify("vendor_id",vendorId);
    }
    /**
     * 设置 [采购]
     */
    public void setPurchaserId(Integer purchaserId){
        this.purchaserId = purchaserId ;
        this.modify("purchaser_id",purchaserId);
    }

}


